﻿<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common/meta.jsp"%>
<%@ include file="/common/content.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>用户信息管理</title>
	</head>
	<body>

		<div class="rhead">
		   <div class="rpos">当前位置: 用户管理  - 用户列表</div>
		   <div class="ropt"><a href="memberAgentAction!add_page.action">新增</a></div>
		   <div class="clear"></div>
  		</div>

		<table class="listTable3" onmouseover="changeto()" onmouseout="changeback()">
		<tr class="headbg">
				<td>
					用户名
				</td>
				<td>
					角色
				</td>
				<td>
					真实名字
				</td>
				<td>
					单位名称
				</td>
				<td>
					编辑时间
				</td>
				<td>
					状态
				</td>
				<td>
					基本操作
				</td>
			</tr>

			<c:forEach var="tusers" items="${usersList}">
				<tr>
					<td>
						
						${tusers.loginName}
					</td>
					<td>
						<c:forEach var="ro" items="${tusers.usersRoleses}">
							${ro.roles.name}&nbsp;&nbsp;&nbsp;&nbsp;
						</c:forEach>
					</td>
					<td>
						${tusers.name}
					</td>
					<td>
						<!--  	<c:if test="${users.sex==1}">男</c:if>
						<c:if test="${users.sex==0}">女</c:if>
						<c:if test="${users.sex!=0 and users.sex!=1}">未知</c:if>-->
						${tusers.workunit}
					</td>
					<td>
						<fmt:formatDate value="${tusers.edittime}" pattern="yyyy-MM-dd" />
					</td>
					<td>
						<c:if test="${tusers.state == 1}">已启用</c:if>
						<c:if test="${tusers.state == 0}">
							<font color="red">已停用</font>
						</c:if>
					</td>
					<td>
						<a href="memberAgentAction!view.action?id=${tusers.id}"> 查看 </a>&nbsp;
						&nbsp;
						<a href="memberAgentAction!edit.action?id=${tusers.id}"> 编辑 </a>&nbsp;
						&nbsp;
						<a href="updatePasswordAction!resetview.action?id=${tusers.id}"> 重置密码 </a>&nbsp;
						&nbsp;	
									
						    <a href="memberAgentAction!delete.action?id=${tusers.id}" onclick="{if(confirm('你真的要删除吗?')){return true;}return false;}">
		            	删除
		            </a>
					</td>
				</tr>
			</c:forEach>
			</table>
			<s:form action="memberAgentAction" method="get" name="form1"
				theme="simple">
				<table class="listTable2">
					<tr>
						<td width="50%">
							&nbsp;&nbsp;共有
							<s:property value="pager.rowCount" />
							条记录，每页行数：
							<s:select name="pageSize" list="pager.pageSizeIndexs"
								theme="simple" value="pager.pageSize"
								onchange="document.all.pageNo.value='1';document.all.form1.submit();" />
							当前第
							<s:select name="pageNo" list="pager.pageNoIndexs" theme="simple"
								value="pager.pageNo" onchange="document.all.form1.submit();" />
							页
						</td>
						<td width="200px">
							<a
								href="javascript:document.all.pageNo.value='<s:property value="pager.firstPageNo" />';document.all.form1.submit();">
								<img src="${ctx}/image/jwc/first.gif" width="37" height="15" />
							</a>

							<a
								href="javascript:document.all.pageNo.value='<s:property value="pager.prePageNo" />';document.all.form1.submit();">
								<img src="${ctx}/image/jwc/back.gif" width="43" height="15" />
							</a>

							<a
								href="javascript:document.all.pageNo.value='<s:property value="pager.nextPageNo"/>';document.all.form1.submit();">
								<img src="${ctx}/image/jwc/next.gif" width="43" height="15" />
							</a>

							<a
								href="javascript:document.all.pageNo.value='<s:property value="pager.lastPageNo" />';document.all.form1.submit();">
								<img src="${ctx}/image/jwc/last.gif" width="37" height="15" />
							</a>
						</td>
					</tr>
				</table>
			</s:form>
	</body>
</html>

